feat(ffi): initial C# bindings (connector only)#423
feat(ffi): initial C# bindings (connector only)#423Benoît Cortier (CBenoit) merged 47 commits intomasterfrom
Conversation
Coverage Report 🤖 ⚙️Past: New: Diff: +0.00% [this comment will be updated automatically] |
|
formatter seems not working anymore, it does not tell you where the format is wrong, neither could update: somehow formatter require me to fix a place I never edited, it is inside |
We don’t expose rustls, we’ll use SslStream in C#. https://sans-io.readthedocs.io/how-to-sans-io.html#why-write-i-o-free-protocol-implementations IronRDP is already largely following this philosophy (and IronVNC too). We do expose higher level helpers to simplify things in upper layers, but this is not part of the "core crates".
Let’s not expose the API for static channels like we do in Rust. I think we can safely hardcode the supported channels like this. We’re not going to implement static channels in C# either, so there is no need to care too deeply about genericity here. As for "Framed", it’s not supposed to be exposed. This is a higher level helper for Rust code.
We stick to the "core" API, which is "sans-IO" and thus do not require choosing between async or not. However, we should provide an higher level API which may be async. However, let’s stick to the standard C# library in the higher level helpers. I don’t think we need much more than that and it will save us maintenance time. If a fancy dependency is required, let’s handle that downstream (in RDM). |
| [[package]] | ||
| name = "anyhow" | ||
| version = "1.0.80" | ||
| version = "1.0.81" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" | ||
| checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" |
There was a problem hiding this comment.
nitpick: Avoid to update the Cargo.lock more than necessary. We use dependabot to update it piece by piece in a controlled way.
There was a problem hiding this comment.
updated!
Benoît Cortier (CBenoit)
left a comment
There was a problem hiding this comment.
Can you also add a .gitattributes file like we have in Picky?
https://github.com/Devolutions/picky-rs/blob/master/.gitattributes
Co-authored-by: Benoît Cortier <bcortier@proton.me>
Co-authored-by: Benoît Cortier <bcortier@proton.me>
Co-authored-by: Benoît Cortier <bcortier@proton.me>
Co-authored-by: Benoît Cortier <bcortier@proton.me>
Benoît Cortier (CBenoit)
left a comment
There was a problem hiding this comment.
LGTM! Thank you!!
Created skeleton for FFI.
Connector module is working now. Please see

ffi\dotnet\Devolutions.IronRdp.ConnectExampleNote: this is a draft, we'll need to discuss more about
There are some imperfections/todo/fixme for now, my apologies.